<template>
	<view class="login-container">
		<button @click="handleLogin">登录</button>
		<m-load />
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},

		onShow() {},
		components: {},
		computed: {},
		methods: {
			async handleLogin() {
				uni.setStorageSync('token', '111')
				const localurl = encodeURIComponent(
					`http://127.0.0.1/pages/home/index`)
				location.href =
					`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx44a3c49894a5ab44&redirect_uri=${localurl}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
			}
		}
	}
</script>

<style scoped lang="scss">
</style>